<?php

/*
Author: Hallvard Westman
Project: Links
 ---------------------------------LOGIN----------------------------------------*/
session_start();
include 'userclass.php';
include 'db.php';

//redirect if user is logged in
if ($user->loggedOn()){
header('Location:links.php?id='.$user->getID());
exit;
}


/*---------------------------------CONTENT OF PAGE----------------------------------------*/
include 'header.php';
include 'bar.php';

//Loginform
if(isset($_GET['id']))
    $error = $_GET['id'];
else
    $error = NULL;
    
echo $user->getLoginForm();
echo "<a>$error</a>";
	

?>
<?php include 'footer.php';?>



